package com.cskaoyan.wxcontroller;

import com.cskaoyan.bean.ad.IndexListVO;
import com.cskaoyan.bean.baseresultVO.BaseRespVo;
import com.cskaoyan.bean.domain.Coupon;
import com.cskaoyan.mapper.CouponMapper;
import com.cskaoyan.service.CouponService;
import com.cskaoyan.service.HomeIndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author looper
 * @
 **/

@RestController
@RequestMapping("/wx/home")
public class WxHomeIndexController {


    //单独写一个服务层进行业务操作
    @Autowired
    HomeIndexService service;

    @RequestMapping("/index")
    public BaseRespVo<IndexListVO> index() {


        IndexListVO indexListVO = service.getHomeIndex();


        return BaseRespVo.ok(indexListVO);


    }
}